<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
    var f = 1;

    (function f() {
      console.log('func->inner',f);
      // 函数声明提升优于变量声明的提升，所以 f=function
      f = 3;
      console.log('函数内重新赋值f',f)
      console.log('全局的f', window.f)
      return f
    })()

    console.log('f', f)
    console.log('z', z)
  </script>
</body>
</html>